package com.sloera.springcloud.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * 配置类，提供restTemplate
 *
 * @author SloeraN
 * @version 1.0
 * @class com.sloera.springcloud.config.ApplicationContextConfig
 * @date 2020/8/12
 */
@Configuration
public class ApplicationContextConfig {
    @Bean
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
    //等同于如下配置
    //applicationContext.xml <bean id="" class="">
}
